<#assign ctx=request.contextPath />
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  <title>大表档案</title>
  <link rel="stylesheet" href="${ctx}/css.css">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
  <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.10&key=9b29a6048cb5ef7de6f503dc38e32d0c&plugin=AMap.ToolBar"></script>
  <!-- 加载远程定位脚本 -->
  <script type="text/javascript" src="${ctx}/remogeo.js"></script>
</head>

<body>
<div class="top">
  <a href="${ctx}/hello" class="backtrack"><img src="${ctx}/0.png"></a>
  <a href="javascript:history.back();" class="return"><img src="${ctx}/12.png"></a>
  <div class="box">
    大表档案
  </div>
</div>

<div class="empty"></div>
<p class="show">
    <b>大表档案:</b>
</p>
<form id="frm1">
  <table class="list_box">
        <tr class="lo_7">
          <td class="lo_3">标题</td>
          <td class="lo_4">详情</td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">水表ID</td>
          <td class="lo_4"><input type="text" name="id" value="${(meter.id)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">表名</td>
          <td class="lo_4"><input type="text" name="name" value="${(meter.name)!}"  class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">表号</td>
          <td class="lo_4"><input type="text" name="meterCode" value="${(meter.meterCode)!}"  class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">户号</td>
          <td class="lo_4"><input type="text" name="userCode" value="${(meter.userCode)!}" class="flow lo_5"></td>
        </tr>
        <#--<tr class="lo_5">-->
          <#--<td class="lo_3">户名</td>-->
          <#--<td class="lo_4"><input type="text" name="estimateLoss" value="${(meter.userCode)!}" class="flow lo_5"></td>-->
        <#--</tr>-->
      <tr>
          <td class="lo_3">安装位置<br>
              (点击大表图标打开高德地图)
              <h4 id='status'></h4>
              <hr>
              <p id='result'></p>
          </td>
          <td class="lo_4">

              <div id="map1" class="map" style="height: 200px;"></div>
              <input type="hidden" id="meterLoc" name="meterLoc" value="${(meter.meterLoc)!""}">

              <script>
                  // wkt: POINT(39.984335 116.310097)
                  var z = document.getElementById("meterLoc").value;
                  if (z) {
                      function a() {
                          var firstLeftIndex = z.lastIndexOf('(');
                          var lastRightIndex = z.indexOf(')');
                          // 去掉首尾括号
                          var str = z.substring(firstLeftIndex + 1, lastRightIndex);
                          var arr = str.split(" ");
                          return arr;
                      };

                      var latlng = a()
                      var lat = Math.min(latlng[1], latlng[0])
                      var lng = Math.max(latlng[1], latlng[0])
                      var map = new AMap.Map("map1", {
                          zoom: 18,
                          center: [lng, lat]
                      });
                      var marker = new AMap.Marker({
                          map: map,
                          position: [lng, lat],
                          label: {
                              offset: new AMap.Pixel(-40, 35),//修改label相对于maker的位置
                              content: '${(meter.name)!""}'
                          }
                      })
                      marker.on('click', function (e) {
                          marker.markOnAMAP({
                              name: '大表图标',
                              position: marker.getPosition()
                          })
                      })
                  }
              </script>
          </td>
      </tr>
      <tr class="lo_5">
          <td class="lo_3">重新定位</td>
          <td class="lo_8"><a href="${ctx}/setupMeter/launch/${meter.id}">重新定位</a></td>
      </tr>
        <tr class="lo_5">
          <td class="lo_3">所归水司</td>
          <td class="lo_4"><input type="text" name="firmId" value="${(meter.firmId)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">数据标识码</td>
          <td class="lo_4"><input type="text" name="extId" value="${(meter.extId)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">DMA-ID</td>
          <td class="lo_4"><input type="text" name="dmaId" value="${(meter.dmaId)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">RTU-ID</td>
          <td class="lo_4"><input type="text" name="rtuId" value="${(meter.rtuId)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">数据通道</td>
          <td class="lo_4"><input type="text" name="commIsp" value="${(meter.commIsp)!}"  class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">脉冲比</td>
          <td class="lo_4"><input type="text" name="userCode" value="${(meter.meterPulse)!}"  class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">水表安装日期</td>
          <td class="lo_4"><input type="text" name="installDate" value="${(meter.installDate?date)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">RTU安装日期</td>
          <td class="lo_4"><input type="text" name="rtuInstallDate" value="${(meter.rtuInstallDate?date)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">水表型号</td>
          <td class="lo_4"><input type="text" name="typeId" value="${(meter.typeId)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">水表口径</td>
          <td class="lo_4"><input type="text" name="size" value="${(meter.size)!}"  class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">水表厂家</td>
          <td class="lo_4"><input type="text" name="memo" value="${(meter.memo)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">水表钢印号</td>
          <td class="lo_4"><input type="text" name="stealNo" value="${(meter.stealNo)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">RTU厂家</td>
          <td class="lo_4"><input type="text" name="remoteBrand" value="${(meter.remoteBrand)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">RTU型号</td>
          <td class="lo_4"><input type="text" name="remoteModel" value="${(meter.remoteModel)!}" class="flow lo_5"></td>
        </tr>
        <tr class="lo_5">
          <td class="lo_3">RTU设备号</td>
          <td class="lo_4"><input type="text" name="rtuCode" value="${(meter.rtuCode)!}"  class="flow lo_5"></td>
        </tr>
        <#--<tr>-->
            <#--<td class="lo_3">是否需要安装</td>-->
            <#--<td class="lo_4"><input type="checkbox" name="needFix" value="${(meter.userCode)!}" checked="checked"></td>-->
        <#--</tr>-->
        <#--<tr>-->
            <#--<td class="lo_3">安装人员</td>-->
            <#--<td class="lo_4">-->
                <#--<input type="text"  name="estimateLoss" />-->
            <#--</td>-->
        <#--</tr>-->
  </table>

</form>

</body>

</html>